package per.ethan.javase.designparttern.singleton;

/**
 * @author Ethan
 * @date 2020/06/01 15:32
 * 静态内部类实现
 */
public class HolderSingleton {

    private HolderSingleton() {

    }

    private static class InnerClass {
        private static final HolderSingleton HOLDER_SINGLETON = new HolderSingleton();
    }

    public static HolderSingleton getInstance() {
        return InnerClass.HOLDER_SINGLETON;
    }

}
